package mmc.networking;

import mmc.action.skill.Skill;
import mmc.ui.KeyBinding;
import mmc.RemoteServer;

@SuppressWarnings("serial")
public class StartCast extends Message {
	String className;
	
	public StartCast(String name)
	{
		className = name;		
	}
	
	@Override
	public void executeOnClient(RemoteServer context){
		try {
			Skill a = (Skill)KeyBinding.getSkill(className);
			//Skill a = (Skill) Class.forName(className).getConstructor().newInstance();
			a.startCast();
			
		} catch (IllegalArgumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
